﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>首页</title>
    <meta name="page-view-size" content="1280*720" />
    <link rel="stylesheet" href="./css/base.css" />
    <link rel="stylesheet" href="./css/index.css" />
    <script type="text/javascript" src="./lib/js/evm.js"></script>
    <script type="text/javascript" src="./lib/js/Evm_djyw.js"></script>
    <script type="text/javascript" src="./lib/js/key.js"></script>
    <script src="lib/js/md5.js" type="text/javascript" charset="utf-8"></script>
    <script src="./lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="./lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="./js/api.js" type="text/javascript" charset="utf-8"></script>
    <script src="./js/public.js" type="text/javascript" charset="utf-8"></script>
</head>

<body onUnload="exitPage();">
    <div class="index-bg" id="indexMain">
        <div class="model"></div>

        <div class="model"><img src="./images/0_slices/1194.png"></div>
        <div class="model"><img src="./images/2_slices/4207.png"></div>
        <div class="model"><img src="./images/2_slices/4208.png" /></div>
        <div class="model"><img src="./images/2_slices/4209.png" /></div>
        <div class="model"><img src="./images/2_slices/4210.png" /></div>
        <div class="model"><img src="./images/2_slices/4215.png" /></div>
        <div class="model"><img src="./images/2_slices/4214.png" /></div>
        <div class="model"><img src="./images/2_slices/4213.png" /></div>
        <div class="model"><img src="./images/2_slices/4212.png" alt=""></div>
        <div class="model"><img src="./images/2_slices/4211.png" alt=""></div>
        <div class="model"><img src="./images/2_slices/1234.png" alt=""></div>
        <div class="model"><img src="./images/2_slices/1237.png" alt=""></div>



    </div>

    <!--<div class="login-bg">
			<div class="login-img">
				<img id="loginImg" src="" alt="">
			</div>
			<div class="login-msg">
				请扫码登录
			</div>
		</div>-->
</body>
<script src="js/video.js"></script>
<script>
    // 首页视频
    var params = {};
    var mediaStr;
    // GetDatas('indexVideo', params, function (err, res) {
    mediaStr = "http://172.19.208.2/index.mp4";
    // 	// console.log(res.data.video, '1111')

    // })
    setTimeout(function() {
        try {
            var videoSize = [58, 72, 582, 451];
            mp = runVideo(mediaStr, videoSize);
        } catch (e) {}
    }, 500);

    var video_number;
    var video_time;
    var loop = setInterval(function() {
        video_number = mp.getCurrentPlayTime();
        video_time = mp.getMediaDuration();

        if (video_number > video_time - 3) {
            mp.playByTime(0, 0, 1);
        }
    }, 2000);

    // console.log(window);

    var modelIndex = {
        isVideo: true,
        disUser: false,
        isIndex: true,
        disHeader: true,
        index: 0, //初始位置
        listName: "model", //模块名称
        containerId: "indexMain", //包含模块的标签id
    };

    var data = [{
            name: "视频窗口",
            url: "play.html",
        }, {
            name: "平语近人",
            cid: "60",
            url: "C_SingleList.html",
            model: 'language'
        }, {
            name: "学习强国",
            idL: "37",
            url: "B_SingleList.html",
            model: "strongContry",
        },

        {
            name: "实践菜单",
            cid: "30",
            url: " B_SingleList.html",
            model: "civilizationCreate"
        }, {
            name: "个性点单",
            id: "",
            url: "A-doubleList.html",
            model: "peopleorder",
        }, {
            name: "志愿服务"　　,
            url: "D_Volunteer_flower.html",
        }, {

            name: "四新引领",
            cid: "55",
            url: "B-doubleList.html",
            model: 'fourNew'
        }, {
            name: "钱江源8090",
            cid: "30",
            url: "E_civilization_practice.html",
            model: 'show'
        }, {
            name: "实践品牌",
            cid: "41",
            url: "A-doubleList.html",
            model: 'brand',
        }, {
            name: "实践阵地",
            cid: "67",
            url: "A_SingleList.html",
            model: 'auditorium'
        }, {
            name: "文明创建",
            cid: "47",
            url: "D_civilization_practice.html",
            model: "sport "
        }, {
            name: "文明随手拍",
            url: "A_SingleList.html",
            model: "photo",
        }, {
            name: "文明超市",
            cid: "47",
            url: "A-doubleList.html",
            model: "goodlist"
        },
    ];

    function direOpt(index, directive) {
        if (directive == "up") {
            //上
            console.log("toptop");
            switch (index) {
                case 0:
                case 1:
                case 2:
                case 3:
                    index = -1;
                    break;


                case 4:
                case 5:
                    index--;
                    break;
                case 6:
                case 7:
                case 8:

                    index = 0;
                    break;
                case 9:
                    index = 1;
                    break;
                case 10:
                    index = 2;
                    break;

                case 11:
                case 12:
                    index = 5;
                    break;
            }
        } else if (directive == "down") {
            //下
            console.log("downdown");
            switch (index) {
                case -1:
                    index = 0;
                    break;
                case 0:
                    index = 6;
                    break;
                case 1:
                    index = 9;
                    break;
                case 2:
                    index = 10;
                    break;

                case 3:
                case 4:
                    index++;
                    break;
                case 5:
                    index = 12;
                    break;

            }
        } else if (directive == "backwards") {
            //左
            console.log("leftleftleft");
            switch (index) {
                case 1:
                case 2:

                    index--;
                    break;
                case 3:
                case 4:
                case 5:
                    index = 2;
                    break;
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:

                    index--

            }
        } else if (directive == "forwards") {
            //右
            console.log("rightright");
            switch (index) {
                case 0:
                case 1:
                case 2:

                    index++;
                    break;
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:

                    index++

            }
        }
        console.log(index);
        return index;
    }






    function direEnter(index) {
        console.log(index);
        if (index == 0) {
            window.location.href = data[index].url + "?mediaStr=" + mediaStr;
        } else {
            window.location.href = data[index].url + "?titles=" + data[index].name + "&model=" + data[index].model;
        }
    }

    function exitPage() {
        try {
            mp.stop();
            // statements
        } catch (e) {
            // statements
            console.log(e);
        }
    }

    // right.toggleFocus();
</script>

<script type="text/javascript" src="js/index.js"></script>

</html>